<?php
namespace api\ggz\service;

use api\ggz\model\ConfigModel;
use think\Request;

class WeChat{
    private  $model ;
    public function __construct(ConfigModel $ConfigModel)
    {
        $this->model    =   $ConfigModel;
    }

    /**根据标注获取配
     * @param Request $request
     * @return array
     */
    public function getConfigByNote(Request $request){
        return $this->model->where(['note'=>$request->param('note')])->select()->toArray();
    }

    /**根据类型type获取配
     * @param Request $request
     * @return array
     */
    public function getConfigByTypeId(Request $request){
        return $this->model->where(['type',$request->param('type')])->select()->toArray();
    }
}